<extend name="Public:layout" />
<block name="main-content">
	<div class="main container">
		<div class="row m">
			<div class="col-lg-8 col-md-8 col-sm-8">
				<div class="bbs-t ">
						<div class="left">
							<img src="__PUBLIC__/home/images/1.jpg" alt="" class="img-thumbnail bbs-img">
						</div>
						<div class="left lc">
							<h3>{$cname}</h3>
						</div>
						<div class="left lbtn">
							<if condition="($nojoin eq 1)">
							<button class="btn btn-warning join-btn" data-id="{$id}">+加入</button>
							</if>
						</div>
						<div class="clearboth"></div>
				</div>
				<div class="hot">
					<div class="sub">
						<volist name="Topic" id="t">
						<div class="s-item row">
							<div class="col-lg-2 col-md-2 col-sm-2">
								<img src="__PUBLIC__/home/images/1.jpg" alt="" class="si-img">
							</div>
							<div class="col-lg-10 col-md-10 col-sm-10">
								<a class="s-t" href="__APP__/topic/show/id/{$t.id}">{$t.topic_title}</a>
								<p class="smp">{$t.article_content|htmlspecialchars|strip_tags|substr=0,24}</p>
								<div>
									<div class="s-l left">
										<span class="author">{$t.man}</span>发表于<span class="bbs">{$t.create_time}</span>
									</div>
									<div class="s-r left">
										<span class="glyphicon glyphicon-eye-open"></span>{$t.click_num}
										<span class="glyphicon glyphicon-comment"></span>3
									</div>
									<div class="clearboth"></div>
								</div>
							</div>
						</div>
						</volist>
						<div class="s-item row">
							<div class="col-lg-2 col-md-2 col-sm-2">
								<img src="__PUBLIC__/home/images/1.jpg" alt="" class="si-img">
							</div>
							<div class="col-lg-10 col-md-10 col-sm-10">
								<a class="s-t" href="__APP__/Topic/show/id/">【励志贴】新学期，先定一个小目标</a>
								<p class="smp">王老板说：“......先定一个能达到的小目标，比方说我</p>
								<div>
									<div class="s-l left">
										<span class="author">数以</span>发表于<span class="bbs">24班的女生</span><span class="date">1天前</span>最后回复:<span class="commen">傻逼</span><span class="cdata">于1天前</span>
									</div>
									<div class="s-r left">
										<span class="glyphicon glyphicon-eye-open"></span>36
										<span class="glyphicon glyphicon-comment"></span>3
									</div>
									<div class="clearboth"></div>
								</div>
							</div>
						</div>
						<div class="s-item row">
							<div class="col-lg-2 col-md-2 col-sm-2">
								<img src="__PUBLIC__/home/images/1.jpg" alt="" class="si-img">
							</div>
							<div class="col-lg-10 col-md-10 col-sm-10">
								<a class="s-t" href="">【励志贴】新学期，先定一个小目标</a>
								<p class="smp">王老板说：“......先定一个能达到的小目标，比方说我</p>
								<div>
									<div class="s-l left">
										<span class="author">数以</span>发表于<span class="bbs">24班的女生</span><span class="date">1天前</span>最后回复:<span class="commen">傻逼</span><span class="cdata">于1天前</span>
									</div>
									<div class="s-r left">
										<span class="glyphicon glyphicon-eye-open"></span>36
										<span class="glyphicon glyphicon-comment"></span>3
									</div>
									<div class="clearboth"></div>
								</div>
							</div>
						</div>
						<div class="s-item row">
							<div class="col-lg-2 col-md-2 col-sm-2">
								<img src="__PUBLIC__/home/images/1.jpg" alt="" class="si-img">
							</div>
							<div class="col-lg-10 col-md-10 col-sm-10">
								<a class="s-t" href="">【励志贴】新学期，先定一个小目标</a>
								<p class="smp">王老板说：“......先定一个能达到的小目标，比方说我</p>
								<div>
									<div class="s-l left">
										<span class="author">数以</span>发表于<span class="bbs">24班的女生</span><span class="date">1天前</span>最后回复:<span class="commen">傻逼</span><span class="cdata">于1天前</span>
									</div>
									<div class="s-r left">
										<span class="glyphicon glyphicon-eye-open"></span>36
										<span class="glyphicon glyphicon-comment"></span>3
									</div>
									<div class="clearboth"></div>
								</div>
							</div>
						</div>
					</div>
					<div class="page">
						<!--<nav>
							<ul class="pagination">
								<li ><a href="#">&laquo;</a></li>
							    <li class="active"><a href="#">1</a></li>
							    <li><a href="#">2</a></li>
							    <li><a href="#">3</a></li>
							    <li><a href="#">4</a></li>
							    <li><a href="#">5</a></li>
							    <li><a href="#">&raquo;</a></li>
							</ul>
						</nav>-->
						{$page}
					</div>
				</div>
			</div>
			<div class="col-lg-4 col-md-4 col-sm-4">
				<h3>热门社区</h3>
				<div class="litem">
					<volist name="hotBbs" id="hb">
						<div class="item4">
							<div class="i-img left">
								<img src="__PUBLIC__/home/images/1.jpg" alt="">
							</div>
							<div class="i-m left">
								<a href="__APP__/Topic/topicList/id/{$hb.id}" class="t-a">{$hb.comm_name}</a><br>
								<small>{$hb.comm_info}</small>
								<div class="im-o">
									<span class="glyphicon glyphicon-user"></span>80
									<span class="glyphicon glyphicon-comment"></span>80
								</div>
							</div>
							<div class="clearboth"></div>
						</div>
					</volist>
					<div class="item4">
						<div class="i-img left">
							<img src="__PUBLIC__/home/images/1.jpg" alt="">
						</div>
						<div class="i-m left">
							<a href="" class="t-a">半夜三根ken甘蔗</a><br>
							<small>这里是简介。。。。</small>
							<div class="im-o">
								<span class="glyphicon glyphicon-user"></span>80
								<span class="glyphicon glyphicon-comment"></span>80
							</div>
						</div>
						<div class="clearboth"></div>
					</div>
					<div class="item4">
						<div class="i-img left">
							<img src="__PUBLIC__/home/images/1.jpg" alt="">
						</div>
						<div class="i-m left">
							<a href="" class="t-a">半夜三根干嘛</a><br>
							<small>这里是简介。。。。</small>
							<div class="im-o">
								<span class="glyphicon glyphicon-user"></span>80
								<span class="glyphicon glyphicon-comment"></span>80
							</div>
						</div>
						<div class="clearboth"></div>
					</div>
					<div class="item4">
						<div class="i-img left">
							<img src="__PUBLIC__/home/images/1.jpg" alt="">
						</div>
						<div class="i-m left">
							<a href="" class="t-a">半夜三根敲代码</a><br>
							<small>这里是简介。。。。</small>
							<div class="im-o">
								<span class="glyphicon glyphicon-user"></span>80
								<span class="glyphicon glyphicon-comment"></span>80
							</div>
						</div>
						<div class="clearboth"></div>
					</div>
					
				</div>
			</div>

		</div>
	</div>
	<script>
		$(function(){
			$(".join-btn").click(function(event) {
				/* Act on the event */
				var id = $(this).data("id");
				var data = {id:id};
				var url = '__APP__/Bbs/joinComunity';
				$.ajax({
					url:url,
					type:'POST',
					dataType:'json',
					data:data,
					success:function(m){
						if (m.status) {
							$(".join-btn").css("display","none");
						}
						alert(m.msg);
					}
				})
			});
		})
	</script>
</block>